import { createRouter, createWebHistory, RouteRecordRaw } from 'vue-router'
import MyMovie from '../views/MyMovie.vue'
import MyCinema from '../views/MyCinema.vue'
import MyInfo from '../views/MyInfo.vue'
import MyMe from '../views/MyMovie.vue'

const routes: Array<RouteRecordRaw> = [
  {
    path:'/',
    redirect: '/movie'
  },
  {
    path: '/movie',
    name: 'movie',
    component: MyMovie
  },
  {
    path: '/cinema',
    name: 'cinema',
    component: MyCinema
  },
  {
    path: '/info',
    name: 'info',
    component: MyInfo
  },
  {
    path: '/me',
    name: 'me',
    component: MyMe
  }
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router
